package cn.shengongying.dao;

import cn.shengongying.model.BossOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 雇主订单信息 Mapper 接口
 * </p>
 *
 * @author RXK
 * @since 2022-01-05
 */
@Repository
public interface BossOrderMapper extends BaseMapper<BossOrder> {

    void logicDelete(@Param("id") Long id);

    List<BossOrder> pageList(@Param("userId") Long userId, @Param("offset") Integer offset, @Param("pageSize") Integer pageSize);

    BossOrder findByOrderNo(@Param("orderNo") String orderNo);

    List<BossOrder> listAndPage(@Param("start") int start, @Param("length") int length);

    long countRefundOrder();

    void updateRefundInfo(BossOrder bossOrder);

    void updateByOrderNo(@Param("outTradeNo") String outTradeNo, @Param("status") int status, @Param("successDate") Date successDate);

    List<BossOrder> findInvoiceList(@Param("start") int start, @Param("length") int length);

    long countInvoice();
}
